<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script type="text/javascript">
		

		var age=10;
		function say(){//1001
			var age=20;
			console.log(this.age);
		}
		var o={
			age:30,
			say:say,//1001
			getSay:function(fn){
				//fn:1001
				fn()//this->window:10
			},
			sayHello:function(){
				//console.log(this.age);//30
				return function(){
					return this.age
				}
			}
		}

		//1.say()
		//say();//window.say();this->window:10

		//2.o.say()
		//o.say();//this->o:30

		//3.o.getSay()
		//o.getSay(say);

		//4.o.sayHello()
		console.log(o.sayHello()());
		//this-.window:10

		o.sayHello()();
		













		/*function say(){
			return function(){
				console.log("hello");
			}
		}

		var a=say();
		a()*/
		//console.log(a);



		/*function say(){//1001
			console.log(this);
		}

		function getSay(fn){//fn:1001
			fn();//
		}


		getSay(say);*/







		/*Object.defineProperty(o,"age",{
			value:20,
			enumerable:false,
			writable:true
		});

		console.log(o.propertyIsEnumerable("age"));*/

		/*for(var key in o){
			console.log(o[key]);
		}*/


	</script>
</head>
<body>
	
</body>
</html>